﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin2.master" AutoEventWireup="true" CodeFile="SearchResult.aspx.cs" Inherits="Admin_SearchResult" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <!--  start table-content  -->
			<div id="table-content">
			
				<!--  start message-red -->
				
				<!--  end message-red -->
			
				<!--  start message-green -->
				<div id="Div1">
				<table border="0" width="100%" cellpadding="0" cellspacing="0">
				<tr>
					<td class="green-left">Kết quả tìm kiếm : </td>
					<td class="green-right"><a class="close-green"><img src="images/table/icon_close_green.gif"   alt="" /></a></td>
				</tr>
				</table>
				</div>
                
				<!--  end message-green -->
                <asp:Label ID="lbLoi" runat="server" ForeColor="Red"></asp:Label>
                <asp:MultiView ID="MultiView1" runat="server">
                    <asp:View ID="View1" runat="server">
                    <fieldset>
            <legend style="text-align: center; font-size: 18px; font-weight: bold;color:Black">Danh sách sản phẩm </legend><br />
     <div align="center">
                    <asp:GridView ID="gvSanPham" runat="server" AutoGenerateColumns="False" 
                         Width="600px" BorderColor="#D2D2D2" 
                        BorderStyle="Solid" BorderWidth="1px" AllowPaging="True" 
                    AllowSorting="True" CellPadding="2" CellSpacing="3" DataKeyNames="MaSP" 
                     onsorting="gvSanPham_Sorting" 
                    onrowcommand="gvSanPham_RowCommand" onrowdeleting="gvSanPham_RowDeleting" 
                    PageSize="5" onpageindexchanging="gvSanPham_PageIndexChanging" 
                        onrowdatabound="gvSanPham_RowDataBound">
                        <Columns>
                            <asp:BoundField DataField="MaSP" HeaderText="Mã Sản Phẩm" 
                                SortExpression="MaSP" />
                            <asp:BoundField DataField="TenSP" HeaderText="Tên Sản Phẩm" 
                                SortExpression="TenSP" />
                            <asp:BoundField DataField="TenLoaiSP" HeaderText="Loại Sản Phẩm" 
                                SortExpression="TenLoaiSP" />
                            <asp:BoundField HeaderText="Giá" DataField="Gia" SortExpression="Gia" 
                                DataFormatString="{0:0,0} VNĐ" />
                                <asp:TemplateField HeaderText="Chọn">
                                <ItemTemplate>
                                <div style="vertical-align:middle;margin-left:10px;">
                                <asp:LinkButton ID="LinkButton2" CssClass="btnicon2" runat="server" 
                                        CommandName="Delete" 
                                        OnClientClick="return confirm('B&#7841;n c&oacute; ch&#7855;c ch&#7855;n mu&#7889;n x&oacute;a sản phẩm n&agrave;y không?');" 
                                        ToolTip="Xóa sản phẩm"></asp:LinkButton>
                                    <asp:LinkButton ID="LinkButton1" CssClass="btnicon1" runat="server" 
                                        CommandName="Edit" ToolTip="Sửa sản phẩm" 
                                        CommandArgument='<%# Eval("MaSP") %>'></asp:LinkButton>
                                    
                                    <!--<asp:LinkButton ID="LinkButton3" CssClass="btnicon3" runat="server"></asp:LinkButton>
                                    <asp:LinkButton ID="LinkButton4" CssClass="btnicon4" runat="server"></asp:LinkButton>
                                    <asp:LinkButton ID="LinkButton5" CssClass="btnicon5" runat="server"></asp:LinkButton>-->
                                    </div>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                            </asp:TemplateField>
                        </Columns>
                        <HeaderStyle BackColor="#666666" BorderColor="#D2D2D2" BorderStyle="Solid" 
                            BorderWidth="1px" Font-Bold="True" ForeColor="White" Height="50px" />
                        <PagerStyle CssClass="pagerstyle" />
                        <RowStyle Height="30px" HorizontalAlign="Center" VerticalAlign="Middle" />

                    </asp:GridView>
                    <br />
                    <asp:Label ID="lbLoiSP" runat="server" ForeColor="Red"></asp:Label>
                    <br />
                    </div>

                    </asp:View>
                    <asp:View ID="View2" runat="server">
                    <fieldset>
            <legend style="text-align: center; font-size: 18px; font-weight: bold;color:Black">Danh sách phân loại </legend><br />
     <div align="center">
                    <asp:GridView ID="gvPhanLoai" runat="server" AutoGenerateColumns="False" 
                         Width="494px" BorderColor="#D2D2D2" 
                        BorderStyle="Solid" BorderWidth="1px" AllowPaging="True" 
                    AllowSorting="True" CellPadding="2" CellSpacing="3" DataKeyNames="LoaiSP" 
                    PageSize="5" onpageindexchanging="gvPhanLoai_PageIndexChanging">
                        <Columns>
                            <asp:TemplateField HeaderText="STT">
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text="<%# Container.DataItemIndex+1 %>"></asp:Label>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center" Width="30px" />
                            </asp:TemplateField>
                            <asp:BoundField DataField="LoaiSP" HeaderText="Mã Loại" 
                                SortExpression="LoaiSP" />
                            <asp:BoundField DataField="TenLoaiSP" HeaderText="Tên Loại" 
                                SortExpression="TenLoaiSP" />
                        </Columns>
                        <HeaderStyle BackColor="#666666" BorderColor="#D2D2D2" BorderStyle="Solid" 
                            BorderWidth="1px" Font-Bold="True" ForeColor="White" Height="50px" />
                        <PagerStyle CssClass="pagerstyle" />
                        <RowStyle Height="30px" HorizontalAlign="Center" VerticalAlign="Middle" />

                    </asp:GridView>
                    <br />
                    <asp:Label ID="lbLoiPL" runat="server" ForeColor="Red"></asp:Label>
                    <br />
                    </div>
                    </asp:View>
                    <asp:View ID="View3" runat="server">
                    <fieldset>
            <legend style="text-align: center; font-size: 18px; font-weight: bold;color:Black">Danh sách Khách Hàng </legend><br />
     <div align="center"> 
         <asp:GridView ID="gvKhachHang" runat="server" AutoGenerateColumns="False" 
                         Width="600px" BorderColor="#D2D2D2" 
                        BorderStyle="Solid" BorderWidth="1px" AllowPaging="True" 
                    AllowSorting="True" CellPadding="2" CellSpacing="3" DataKeyNames="TenDangNhap" 
                    PageSize="5" onpageindexchanging="gvKhachHang_PageIndexChanging">
                        <Columns>
                            <asp:BoundField DataField="TenDangNhap" HeaderText="Tên Đăng Nhập" 
                                SortExpression="TenDangNhap" />
                            <asp:BoundField DataField="TenKH" HeaderText="Tên Khách Hàng" 
                                SortExpression="TenKH" />
                            <asp:BoundField HeaderText="Email" DataField="Email" SortExpression="Email" />
                            <asp:BoundField HeaderText="Số HD" DataField="sohd" SortExpression="sohd" />
                            <asp:BoundField HeaderText="Tổng Số Tiền" DataField="TongTien" 
                                SortExpression="TongTien" DataFormatString="{0:0,000} VNĐ" />
                        </Columns>
                        <HeaderStyle BackColor="#666666" BorderColor="#D2D2D2" BorderStyle="Solid" 
                            BorderWidth="1px" Font-Bold="True" ForeColor="White" Height="50px" />
                        <PagerStyle CssClass="pagerstyle" />
                        <RowStyle Height="30px" HorizontalAlign="Center" VerticalAlign="Middle" />

                    </asp:GridView>
         <br />
         <asp:Label ID="lbLoiKH" runat="server" ForeColor="Red"></asp:Label>
                        </div> <br />
                    </fieldset>
                    </asp:View>
                    <asp:View ID="View4" runat="server">
                    <fieldset>
            <legend style="text-align: center; font-size: 18px; font-weight: bold;color:Black">Danh sách Tin Tức </legend><br />
     <div align="center"> 
     <asp:GridView ID="gvTinTuc" runat="server" AutoGenerateColumns="False" 
                         Width="1000px" BorderColor="#D2D2D2" 
                        BorderStyle="Solid" BorderWidth="1px" AllowPaging="True" 
                    AllowSorting="True" CellPadding="2" CellSpacing="3" DataKeyNames="MaTT" 
                    PageSize="5" onpageindexchanging="gvTinTuc_PageIndexChanging">
                        <Columns>
                            <asp:BoundField DataField="MaTT" HeaderText="Mã TT" 
                                SortExpression="MaTT" >
                            <ItemStyle Width="40px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="TieuDe" HeaderText="Tiêu Đề" 
                                SortExpression="TieuDe" >
                            <ControlStyle Width="100px" />
                            <ItemStyle Width="100px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="MoDau" HeaderText="Mở Đầu" SortExpression="MoDau" 
                                HtmlEncode="False" HtmlEncodeFormatString="False" >
                            <ControlStyle Width="300px" />
                            <ItemStyle Width="300px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="TenLoai" HeaderText="Loại Tin" 
                                SortExpression="TenLoai" >
                            <ItemStyle Width="60px" />
                            </asp:BoundField>
                            <asp:TemplateField HeaderText="Ảnh Minh Họa">
                                <ItemTemplate>
                                    <asp:Image ID="imgTT" runat="server" 
                                        ImageUrl='<%# "images/QC/"+Eval("HinhAnh") %>' Height="40px" Width="40px" />
                                </ItemTemplate>
                                <ItemStyle Width="100px" />
                            </asp:TemplateField>
                        </Columns>
                        <HeaderStyle BackColor="#666666" BorderColor="#D2D2D2" BorderStyle="Solid" 
                            BorderWidth="1px" Font-Bold="True" ForeColor="White" Height="50px" />
                        <PagerStyle CssClass="pagerstyle" />
                        <RowStyle Height="30px" HorizontalAlign="Center" VerticalAlign="Middle" />

                    </asp:GridView>
         <br />
         <asp:Label ID="lbLoiTT" runat="server" ForeColor="Red"></asp:Label>
         <br />
     </div>
     </fieldset>
                    </asp:View>
                </asp:MultiView>

		        
		 
				<!--  start product-table ..................................................................................... -->
			</div>
			
		
			
			
			<div class="clear"></div>
</asp:Content>

